
////////////////////////////////////////////////////////////////////////////////
// Filename: commonmath.cpp
////////////////////////////////////////////////////////////////////////////////
#include "commonmathclass.h"


Commonmath::Commonmath()
{
	
}

Commonmath::~Commonmath()
{
}

D3DXVECTOR3 Commonmath::getRotation3D(D3DXVECTOR3* a, D3DXVECTOR3* b) {
	D3DXVECTOR3 result;
	//Calculate the Difference
	result = *a-*b;
	float length = D3DXVec3Length(&result);
	//Save the X/Y/Z Angles into the ResultVector
	result.x = acos(result.x/length);
	result.y = acos(result.y/length);
	result.z = acos(result.z/length);
	return result;
}